package com.googlecode.slm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.googlecode.slm.daomapper.TreeMapper;

@Service
public class SecurityService {

    @Autowired
    @Qualifier(value = "treeMapper")
    private TreeMapper treeMapper;

	public TreeMapper getTreeMapper() {
		return treeMapper;
	}

	public void setTreeMapper(TreeMapper treeMapper) {
		this.treeMapper = treeMapper;
	}
    
	
	public boolean getClassGard(int gid, String className){
		Integer id = treeMapper.getClassGard(gid, className);
		if (id==null)
			return false;
		return true;
	}
}
